#!/usr/bin/env python
#coding:utf-8

import urllib2
import urllib
import sys

#google.com
url = 'http://www.google.com/search'
search = urllib.urlencode([('q', 'python')])
req = urllib2.Request(url)
fd = urllib2.urlopen(req, search)
while 1:
    data = fd.read(1024)
    if not len(data):
        break
    sys.stdout.write(data)
